Appendix: Simulating inbound e-invoices

It is not yet possible to retrieve e-documents from the Sage Network in release 2023 R2. You can simulate this process using two tables:

  • EINVWK (header)

  • EINVWKD (lines)

The best way to populate these tables with records is to create import/export templates.

The fields to include in the templates are listed below:

Table

Field

Description

Comment

Headers

EINVWK

BPRVCRID

Identifier

e-invoice key

EINVWK

BPRVCR

Source document

Mandatory

EINVWK

BPRDAT

Source date

Mandatory

EINVWK

CPYEECNUM

Company EU VAT no.

Mandatory

EINVWK

IMPDAT

Import date

Mandatory

EINVWK

LEG

Legislation

FRA

EINVWK

CPYCRN

Company tax ID no.

Mandatory

EINVWK

FCYCRT

Site tax ID no.

Mandatory

EINVWK

EINVTYP

Invoice type code

380 for an invoice

EINVWK

BPRNAM

BP name

Mandatory

EINVWK

BPREECNUM

BP EU VAT no.

Mandatory

EINVWK

BPRCRN

BP company tax ID no

Mandatory

EINVWK

BPRCRT

BP site tax ID no.

Mandatory

EINVWK

UBLCUR

Source currency

EUR

EINVWK

STA

Status

1

EINVWK

AMTATI

Amount + tax

Mandatory

EINVWK

AMTNOT

Amount - tax

Mandatory

EINVWK

TOTTAXAMT

Tax total amount

Mandatory

Lines

EINVWKD

BPRVCRID

Identifier

e-invoice key, header must exist

EINVWKD

LIG

Line number

1

Header examples

This example shows how you can define headers.

For each header, the Line number needs to be 1.

The Status needs to be 1 ( To be mapped) and the Legislation needs to be FRA (French legislation).

Verify that the EU VAT no., tax ID, Invoice type code, Name, ISO code currency fields are consistent with the master data if you want the mapping to be processed successfully.

File header examples

Identifier1;Invoice1;01112023;FR75313966129;01112023;FRA;313966129;31396612900857;380;Sage;FR75313966129;313966129;31396612900857;EUR;1;1000;1200;200

Identifier2;Invoice2;01112023;FR75313966129;01112023;FRA;313966129;31396612900857;380;Sage;FR75313966129;313966129;31396612900857;EUR;1;1000;1200;200

Identifier3;Invoice3;01112023;FR75313966129;01112023;FRA;313966129;31396612900857;380;Sage;FR75313966129;313966129;31396612900857;EUR;1;1000;1200;200

Associated lines

Identifier1;1

Identifier2;1

Identifier3;1